package com.ithuaxin.method;

import com.ithuaxin.identifier.Count;

public class Test7 {
    public static void main(String[] args) {
        int num = 74236;
        int num2 = num;
        int count = 0;
        int sum = 0;
        while (num != 0){
            num = num /10;
            count++;
        }
        int arr[] = new int[count];
        for (int i = 0; i < arr.length; i++) {
            arr[i] = num2 % 10;
            num2 = num2 / 10;
        }
        for (int i = 0; i < arr.length; i++) {
            if (arr[i]<5){
                arr[i] = arr[i] + 10;
            }
        }
        for (int i = 0; i < arr.length; i++) {
            arr[i] = arr[i] - 5;
        }
        for (int i = 0; i < arr.length; i++) {
            sum = sum *10 + arr[i];
        }
        System.out.println(sum);
    }
}
